package com.shijie.mapper;

import com.shijie.aop.annotation.AutoTimeFill;
import com.shijie.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface AccountMapper {

    @AutoTimeFill({AutoTimeFill.CREATE_TIME, AutoTimeFill.UPDATE_TIME})
    boolean register(@Param("user") User user);

    User getByUsername(@Param("username") String username);

    User getByUseId(@Param("userId") Long userId);

    @AutoTimeFill({AutoTimeFill.UPDATE_TIME})
    boolean updateInfo(@Param("user") User user);

}
